# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: Exp $

inherit eutils

DESCRIPTION="PL/Proxy is a proxy language used for remote database procedure calls and data partitioning between databases based on hashing field values."
HOMEPAGE="https://developer.skype.com/SkypeGarage/DbProjects/PlProxy"
SRC_URI="http://pgfoundry.org/frs/download.php/1355/plproxy-2.0.2.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
IUSE=""

DEPEND="=dev-db/libpq-8*"

src_compile() {
    emake
}

src_install() {
    emake DESTDIR="${D}" install || die "emake install failed"

    dodoc AUTHORS COPYRIGHT NEWS README doc/*.txt
    
    insinto /usr/share/doc/${PF}
    doins plproxy.sql || die "doins failed"
    
    dodir /usr/share/doc/${PF}/sql
    insinto /usr/share/doc/${PF}/sql
    doins sql/* || die "doins failed"
    
    dodir /usr/share/doc/${PF}/config
    insinto /usr/share/doc/${PF}/config
    doins config/* || die "doins failed"
}
